/*
package com.siyougame.weixin.config;

import me.chanjar.weixin.cp.api.WxCpService;
import me.chanjar.weixin.cp.api.impl.WxCpServiceImpl;
import me.chanjar.weixin.cp.config.WxCpConfigStorage;
import me.chanjar.weixin.cp.config.impl.WxCpDefaultConfigImpl;
import me.chanjar.weixin.cp.config.impl.WxCpRedisTemplateConfigImpl;
import me.chanjar.weixin.cp.config.impl.WxCpRedissonConfigImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.StringRedisTemplate;

*/
/**
 * @Author: lvliangjun
 * @Date: 2024/5/23 8:55
 *//*

@Configuration
@EnableConfigurationProperties(WxCpProperties.class)
public class WxCpConfiguration {

    private final WxCpProperties properties;

    @Autowired
    public WxCpConfiguration(WxCpProperties properties) {
        this.properties = properties;
    }


    @Autowired
    private StringRedisTemplate stringRedisTemplate;
//    static String corpid = "wp-719DgAAy9Y7e5xDMmLf48VBLM1jUg";
//    static String secret = "C37Utx4cYlWHl04JP_g0Y7MUGXQ6NCwxBnW-24QAbpY";
//    static Integer agentid = 1000029;
    @Bean
    public WxCpService wxCpService() {
        WxCpService wxCpService = new WxCpServiceImpl();
        wxCpService.setWxCpConfigStorage(wxCpConfigStorage());
        return wxCpService;
    }


    public WxCpConfigStorage wxCpConfigStorage() {
        WxCpRedisTemplateConfigImpl wxCpRedisTemplateConfig=new WxCpRedisTemplateConfigImpl(stringRedisTemplate,"weixin");
        wxCpRedisTemplateConfig.setCorpId(properties.getCorpId());
        wxCpRedisTemplateConfig.setCorpSecret(properties.getCorpSecret());
        wxCpRedisTemplateConfig.setAgentId(properties.getAgentId());
        return wxCpRedisTemplateConfig;
    }
}
*/
